package net.cyan.proteus;

import net.cyan.commons.util.DataConvert;

import java.io.IOException;

/**
 * 
 * @author camel
 * @date 2008-3-12
 */
public abstract class AbstractTemplateWriter implements TemplateWriter
{
    public void writeln(String s) throws IOException
    {
        write(s);
        write("\n");
    }

    public void write(StringBuilder buffer) throws IOException
    {
        write(buffer.toString());
    }

    public void write(Object obj) throws IOException
    {
        if (obj != null)
            write(DataConvert.toString(obj));
    }
}
